library(ggplot2)
library(dplyr)##
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
library(tidyverse)## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.0 ──
## ✓ tibble 3.1.0 ✓ purrr 0.3.4
## ✓ tidyr 1.1.3 ✓ stringr 1.4.0
## ✓ readr 1.4.0 ✓ forcats 0.5.1
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## x dplyr::filter() masks stats::filter()
## x dplyr::lag() masks stats::lag()
library(arsenal)
library(data.table)##
## Attaching package: 'data.table'
## The following object is masked from 'package:purrr':
##
## transpose
## The following objects are masked from 'package:dplyr':
##
## between, first, last
library(expss)##
## Attaching package: 'expss'
## The following objects are masked from 'package:data.table':
##
## copy, like
## The following objects are masked from 'package:stringr':
##
## fixed, regex
## The following objects are masked from 'package:purrr':
##
## keep, modify, modify_if, transpose, when
## The following objects are masked from 'package:tidyr':
##
## contains, nest
## The following objects are masked from 'package:dplyr':
##
## between, compute, contains, first, last, na_if, recode, vars
## The following object is masked from 'package:ggplot2':
##
## vars
library(ggsci)
#ideas, stratify by what do you consider a good nights sleep
#additive index according to behaviors
#regression models for the outcome.
#Positive quality of sleep -
#Consistent wake up
#Greater than 7 hrs to 9 hrs --> stratify #for sure USE THIS AND ONE OR THE OTHER
#Agreement questions Q44
#Current bedtime routines
#Current lifestyle habits
#Employment and childrenanalysisdata <- readRDS("foranalysis.rds")#Binary variable for seven or nine weighted as 1
analysisdata <- analysisdata %>% mutate(
sevenornine = case_when(
Q10_workdayhoursofsleep >= 7.0 & Q10_workdayhoursofsleep <= 9.0 ~ 1,
Q10_workdayhoursofsleep < 7.0 | Q10_workdayhoursofsleep > 9.0 ~ 0,
is.na(Q10_workdayhoursofsleep) ~ NA_real_
))
#analysisdata <- analysisdata %>% mutate(
# sevenornine = case_when(
# Q10_workdayhoursofsleep >= 7.0 & Q10_workdayhoursofsleep <= 9.0 ~ 2,
# Q10_workdayhoursofsleep < 7.0 | Q10_workdayhoursofsleep > 9.0 ~ 0,
# is.na(Q10_workdayhoursofsleep) ~ NA_real_
# ))
#Binary variable for quality of sleep weighted as 1
analysisdata <- analysisdata %>% mutate(
quality = case_when(
Q44_6_ifeelpositiveaboutthequalityofmysleep == "Somewhat agree" ~ 1,
Q44_6_ifeelpositiveaboutthequalityofmysleep == "Strongly agree" ~ 1,
is.na(Q44_6_ifeelpositiveaboutthequalityofmysleep) ~ NA_real_,
TRUE ~ 0))
#Binary variable for consistency of wake up weighted as 1
analysisdata <- analysisdata %>% mutate(
consistency = case_when(
Q13_consistentwakeup == "Yes" ~ 1,
is.na(Q13_consistentwakeup) ~ NA_real_,
TRUE ~ 0))
#Compositescore computation
analysisdata <- analysisdata %>% mutate(
compositescore = sevenornine + quality + consistency
)
#analysisdata <- analysisdata %>% mutate(compositeoutcomegoodsleep = factor(compositescore, label = c("score 0 - worst sleep", "score 1", "score 2", "score 3 - best sleep"))) %>%
# filter(!is.na(compositescore))
#analysisdata <- analysisdata %>% mutate(compositeoutcomegoodsleep = factor(compositescore, label = c("score 0 - worst sleep", "score 1", "score 2", "score 3", "score 4 - best sleep"))) %>%
# filter(!is.na(compositescore))
analysisdata <- analysisdata %>% mutate(compositeoutcomegoodsleep = case_when(
compositescore >= 2 ~ 1,
compositescore < 2 ~ 0,
is.na(compositescore) ~ NA_real_)) %>%
mutate(compositeoutcomegoodsleep = factor(compositeoutcomegoodsleep, label = c("Poor sleep (score less than 2)", "Good sleep (score 2 or more)"))) %>% filter(!is.na(compositescore))
#Logistic regression just input demographic variables, then add pyschosocial variables and see how that affects model statistics. Sequential adjustment.
#Cut it in different places.
#Split between 2 and 3 , and 3 and 4
#Cumulative score how many ones do you get
#hours of sleep (7-9) vs. outside of (7-9) --> either interim category
#quality of sleep (1) sometimes or (0)
#consistent wakeup (1) sometimes/no (0)tab1 <- tableby(compositeoutcomegoodsleep~ Q3_role +
Q4_gender +
Q5_age +
Q6_numberinhousehold +
Q37_employed +
Q8_diagnosis +
Q10_workdayhoursofsleep +
Q11_weekendhoursofsleep +
Q9_howoftensleepy,
data=analysisdata, test=TRUE, total=TRUE,
numeric.stats=c("medianq1q3"), numeric.test="kwt", cat.test="chisq")
summary(tab1, title='Table 1. Baseline information', pfootnote=TRUE, digits = 2)| Poor sleep (score less than 2) (N=91) | Good sleep (score 2 or more) (N=107) | Total (N=198) | p value | |
|---|---|---|---|---|
| What is your role at Bloomberg | 0.8041 | |||
| Â Â Â Faculty/Staff Member | 3 (3.3%) | 2 (1.9%) | 5 (2.5%) | |
| Â Â Â Full-time student | 63 (69.2%) | 74 (69.2%) | 137 (69.2%) | |
| Â Â Â Part-time student | 25 (27.5%) | 31 (29.0%) | 56 (28.3%) | |
| What gender do you identify as? | 0.0331 | |||
| Â Â Â Female | 66 (72.5%) | 92 (86.0%) | 158 (79.8%) | |
| Â Â Â Male | 20 (22.0%) | 15 (14.0%) | 35 (17.7%) | |
| Â Â Â Non-binary / third gender | 4 (4.4%) | 0 (0.0%) | 4 (2.0%) | |
| Â Â Â Prefer not to say | 1 (1.1%) | 0 (0.0%) | 1 (0.5%) | |
| How old are you? | 0.9832 | |||
| Â Â Â Median (Q1, Q3) | 28.00 (25.00, 33.00) | 28.00 (25.00, 31.50) | 28.00 (25.00, 32.00) | |
| How many people live in your household, including yourself? | 0.0682 | |||
| Â Â Â Median (Q1, Q3) | 2.00 (2.00, 3.00) | 2.00 (2.00, 3.00) | 2.00 (2.00, 3.00) | |
| Are you currently employed outside of your education program? | 0.1961 | |||
| Â Â Â N-Miss | 1 | 0 | 1 | |
| Â Â Â No | 47 (52.2%) | 46 (43.0%) | 93 (47.2%) | |
| Â Â Â Yes | 43 (47.8%) | 61 (57.0%) | 104 (52.8%) | |
| Have you ever been diagnosed with any of the following sleep disorders? | 0.8031 | |||
| Â Â Â Insomnia | 7 (7.7%) | 5 (4.7%) | 12 (6.1%) | |
| Â Â Â No | 81 (89.0%) | 98 (91.6%) | 179 (90.4%) | |
| Â Â Â Other | 1 (1.1%) | 2 (1.9%) | 3 (1.5%) | |
| Â Â Â Sleep Apnea | 2 (2.2%) | 2 (1.9%) | 4 (2.0%) | |
| During the past 5 workdays, how many hours of sleep did you get per night on average? | < 0.0012 | |||
| Â Â Â Median (Q1, Q3) | 6.00 (5.00, 7.00) | 7.00 (7.00, 8.00) | 7.00 (6.00, 7.50) | |
| During the past weekend, how many hours of sleep did you get per night on average? | 0.0082 | |||
| Â Â Â Median (Q1, Q3) | 7.50 (7.00, 9.00) | 8.00 (7.50, 9.00) | 8.00 (7.00, 9.00) | |
| How often do you feel sleepy during the day? | ||||
| Â Â Â N-Miss | 43 | 21 | 64 | |
| Â Â Â Never | 0 (0.0%) | 2 (2.3%) | 2 (1.5%) | |
| Â Â Â Rarely | 7 (14.6%) | 18 (20.9%) | 25 (18.7%) | |
| Â Â Â Sometimes | 33 (68.8%) | 63 (73.3%) | 96 (71.6%) | |
| Â Â Â Very often | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | |
| Â Â Â Always | 8 (16.7%) | 3 (3.5%) | 11 (8.2%) |
#If student
student <- analysisdata %>% filter(Q3_role != "Faculty/Staff Member")
tab1 <- tableby(compositeoutcomegoodsleep~ Q2_program,
data=student, test=TRUE, total=TRUE,
numeric.stats=c("medianq1q3"), numeric.test="kwt", cat.test="chisq")
summary(tab1, title='Table 1. Baseline information', pfootnote=TRUE, digits = 2)| Poor sleep (score less than 2) (N=88) | Good sleep (score 2 or more) (N=105) | Total (N=193) | p value | |
|---|---|---|---|---|
| What is your current program at Bloomberg? | 0.0961 | |||
| Â Â Â Doctoral Student | 18 (20.5%) | 34 (32.4%) | 52 (26.9%) | |
| Â Â Â Masters Student | 66 (75.0%) | 69 (65.7%) | 135 (69.9%) | |
| Â Â Â Other | 0 (0.0%) | 1 (1.0%) | 1 (0.5%) | |
| Â Â Â Post doctoral student | 4 (4.5%) | 1 (1.0%) | 5 (2.6%) |
#If employed
employed <- analysisdata %>% filter(Q37_employed == "Yes")
tab1 <- tableby(compositeoutcomegoodsleep ~ Q38_wfh,
data=employed, test=TRUE, total=TRUE,
numeric.stats=c("medianq1q3"), numeric.test="kwt", cat.test="chisq")
summary(tab1, title='Table 1. Baseline information', pfootnote=TRUE, digits = 2)| Poor sleep (score less than 2) (N=43) | Good sleep (score 2 or more) (N=61) | Total (N=104) | p value | |
|---|---|---|---|---|
| Do you work from home? | 0.4831 | |||
| Â Â Â No | 14 (32.6%) | 16 (26.2%) | 30 (28.8%) | |
| Â Â Â Yes | 29 (67.4%) | 45 (73.8%) | 74 (71.2%) |
#If wfh
notworkfromhome <- analysisdata %>% filter(Q37_employed == "Yes" & Q38_wfh == "No")
tab1 <- tableby(compositeoutcomegoodsleep ~ Q39_dayornight,
data=notworkfromhome, test=TRUE, total=TRUE,
numeric.stats=c("medianq1q3"), numeric.test="kwt", cat.test="chisq")
summary(tab1, title='Table 1. Baseline information', pfootnote=TRUE, digits = 2)| Poor sleep (score less than 2) (N=14) | Good sleep (score 2 or more) (N=16) | Total (N=30) | p value | |
|---|---|---|---|---|
| Do you work day or night shifts? | 0.5011 | |||
| Â Â Â N-Miss | 0 | 1 | 1 | |
| Â Â Â Day shift | 12 (85.7%) | 14 (93.3%) | 26 (89.7%) | |
| Â Â Â Night shift | 2 (14.3%) | 1 (6.7%) | 3 (10.3%) |
tab1 <- tableby(compositeoutcomegoodsleep~
Q15_consistentbedtimeonweekdays +
Q49_sleepqualitychangecovid +
bedtimeroutine +
Q19_howmanyhourssdidyouuseascreen +
as.numeric(Q19_howmanyhourssdidyouuseascreen) +
Q12_1_howmanynightsusescreen +
Q17_stressedaboutschool +
cantsleepfeeling +
Q18_howoftenpracticemindfullness +
behaviors +
Q44_1_thingsidointhelasthourbeforesleepaffectthequalityofmysleep +
Q44_2_gettingagoodnightssleepisimportantome +
Q44_3_mostofmyfriendshaveahealthysleeproutine +
Q44_4_lackofsleepaffectsmyacademicperformance +
Q44_5_havingaregularsleeproutineimprovesmentalclariy +
Q44_7_ithinkcuttingoutscreenuseonehourbeforesleepleadstobettersleep +
Q44_8_ithinkingworkingoutregularlyleadstobettersleep +
Q44_9_ithinkmeditatingbeforesleephelpsquality +
Q59_1_icanmaintainhealthysleephabits +
Q59_2_icancutoutscreenuseonehourbeforesleep +
Q59_3_icanworkoutregularly +
Q59_4_icanmediatebeforebed +
Q37_whatdoyouconsideragoodnightssleep +
Q50_1_energyfordailyacitivites +
Q50_2_attractivness +
Q50_3_productivity +
Q50_4_accomplishmentofotherdailygoals +
Q50_5_mentalandemotionalwellbeing +
Q50_6_fosteringmaintaingrelationships +
Q50_7_caringforchildren +
Q53_1_getoutsidefor10mininthemorning +
Q53_2_exerciseduringtheday +
Q53_3_doingabreathingexercisebeforesleep +
Q53_4_notusescreens +
Q53_5_listeningtoacalmingaudiobookorpodcast +
information,
data=analysisdata, test=TRUE, total=TRUE,
numeric.stats=c("medianq1q3"), numeric.test="kwt", cat.test="chisq")
summary(tab1, title='Table 2. Sleep questions', pfootnote=TRUE, digits = 2)| Poor sleep (score less than 2) (N=91) | Good sleep (score 2 or more) (N=107) | Total (N=198) | p value | |
|---|---|---|---|---|
| Do you have a consistent time you wake up on weekdays? | < 0.0011 | |||
| Â Â Â No | 62 (68.1%) | 23 (21.5%) | 85 (42.9%) | |
| Â Â Â Sometimes | 16 (17.6%) | 31 (29.0%) | 47 (23.7%) | |
| Â Â Â Yes | 13 (14.3%) | 53 (49.5%) | 66 (33.3%) | |
| Has your sleep quality changed due to the COVID-19 pandemic? | < 0.0011 | |||
| Â Â Â N-Miss | 1 | 1 | 2 | |
| Â Â Â No | 26 (28.9%) | 44 (41.5%) | 70 (35.7%) | |
| Â Â Â Yes, I feel my sleep quality has improved | 4 (4.4%) | 22 (20.8%) | 26 (13.3%) | |
| Â Â Â Yes, I feel my sleep quality has worsened | 60 (66.7%) | 40 (37.7%) | 100 (51.0%) | |
| My bedtime routine includes: | 0.6381 | |||
| Â Â Â N-Miss | 1 | 0 | 1 | |
| Â Â Â Brushing teeth | 30 (33.3%) | 33 (30.8%) | 63 (32.0%) | |
| Â Â Â Phone usage | 5 (5.6%) | 4 (3.7%) | 9 (4.6%) | |
| Â Â Â Reading | 4 (4.4%) | 1 (0.9%) | 5 (2.5%) | |
| Â Â Â Showering | 1 (1.1%) | 1 (0.9%) | 2 (1.0%) | |
| Â Â Â Washing my face | 49 (54.4%) | 67 (62.6%) | 116 (58.9%) | |
| Â Â Â Watching TV | 1 (1.1%) | 1 (0.9%) | 2 (1.0%) | |
| How many hours per day do you typically use a screen? (i.e. cell phone, tablet, computer, television) | ||||
| Â Â Â N-Miss | 2 | 1 | 3 | |
| Â Â Â 0 | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | |
| Â Â Â 1 | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | |
| Â Â Â 2 | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | |
| Â Â Â 3 | 1 (1.1%) | 2 (1.9%) | 3 (1.5%) | |
| Â Â Â 4 | 2 (2.2%) | 3 (2.8%) | 5 (2.6%) | |
| Â Â Â 5 | 3 (3.4%) | 2 (1.9%) | 5 (2.6%) | |
| Â Â Â 6 | 4 (4.5%) | 5 (4.7%) | 9 (4.6%) | |
| Â Â Â 7 | 3 (3.4%) | 2 (1.9%) | 5 (2.6%) | |
| Â Â Â 8 | 15 (16.9%) | 11 (10.4%) | 26 (13.3%) | |
| Â Â Â 9 | 3 (3.4%) | 7 (6.6%) | 10 (5.1%) | |
| Â Â Â 10 | 22 (24.7%) | 33 (31.1%) | 55 (28.2%) | |
| Â Â Â 11 | 2 (2.2%) | 0 (0.0%) | 2 (1.0%) | |
| Â Â Â 12 | 20 (22.5%) | 29 (27.4%) | 49 (25.1%) | |
| Â Â Â 13 | 2 (2.2%) | 2 (1.9%) | 4 (2.1%) | |
| Â Â Â 14 | 7 (7.9%) | 6 (5.7%) | 13 (6.7%) | |
| Â Â Â 15 | 4 (4.5%) | 1 (0.9%) | 5 (2.6%) | |
| Â Â Â 16 | 1 (1.1%) | 2 (1.9%) | 3 (1.5%) | |
| Â Â Â 17 | 0 (0.0%) | 1 (0.9%) | 1 (0.5%) | |
| How many hours per day do you typically use a screen? (i.e. cell phone, tablet, computer, television) | 0.8922 | |||
| Â Â Â Median (Q1, Q3) | 11.00 (9.00, 13.00) | 11.00 (10.00, 13.00) | 11.00 (9.00, 13.00) | |
| In the past week, how many nights did you use screens (i.e. cell phone, tablet, computer, television) within 1 hour before bed? | 0.3372 | |||
| Â Â Â Median (Q1, Q3) | 7.00 (7.00, 7.00) | 7.00 (6.00, 7.00) | 7.00 (7.00, 7.00) | |
| How stressed do you currently feel about school? | 0.1822 | |||
| Â Â Â Median (Q1, Q3) | 7.00 (6.00, 8.00) | 7.00 (5.00, 8.00) | 7.00 (5.75, 8.00) | |
| When you can’t sleep do you feel | 0.0301 | |||
| Â Â Â Angry | 3 (3.3%) | 8 (7.5%) | 11 (5.6%) | |
| Â Â Â Frustrated | 41 (45.1%) | 59 (55.1%) | 100 (50.5%) | |
| Â Â Â Guilty | 23 (25.3%) | 11 (10.3%) | 34 (17.2%) | |
| Â Â Â None of the above | 6 (6.6%) | 7 (6.5%) | 13 (6.6%) | |
| Â Â Â Other | 5 (5.5%) | 5 (4.7%) | 10 (5.1%) | |
| Â Â Â Sad | 5 (5.5%) | 1 (0.9%) | 6 (3.0%) | |
| Â Â Â Stressed | 8 (8.8%) | 16 (15.0%) | 24 (12.1%) | |
| How often do you practice mindfulness techniques? (i.e. breathing exercises, meditation, etc.,) | ||||
| Â Â Â N-Miss | 8 | 10 | 18 | |
| Â Â Â Never | 12 (14.5%) | 21 (21.6%) | 33 (18.3%) | |
| Â Â Â Rarely | 39 (47.0%) | 34 (35.1%) | 73 (40.6%) | |
| Â Â Â Sometimes | 31 (37.3%) | 39 (40.2%) | 70 (38.9%) | |
| Â Â Â Very often | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | |
| Â Â Â Always | 1 (1.2%) | 3 (3.1%) | 4 (2.2%) | |
| Which of the following behaviors do you participate in? | 0.0841 | |||
| Â Â Â N-Miss | 1 | 1 | 2 | |
| Â Â Â Alcohol Consumption | 36 (40.0%) | 59 (55.7%) | 95 (48.5%) | |
| Â Â Â Cigarette smoking | 3 (3.3%) | 1 (0.9%) | 4 (2.0%) | |
| Â Â Â Daytime napping | 0 (0.0%) | 1 (0.9%) | 1 (0.5%) | |
| Â Â Â Drinking Caffeinated beverages | 2 (2.2%) | 2 (1.9%) | 4 (2.0%) | |
| Â Â Â Exercise | 32 (35.6%) | 35 (33.0%) | 67 (34.2%) | |
| Â Â Â Social Media Use | 17 (18.9%) | 8 (7.5%) | 25 (12.8%) | |
| The things I do in the last hour before bed affect the quality of my sleep. | 0.9001 | |||
| Â Â Â Strongly disagree | 3 (3.3%) | 3 (2.8%) | 6 (3.0%) | |
| Â Â Â Somewhat disagree | 5 (5.5%) | 8 (7.5%) | 13 (6.6%) | |
| Â Â Â Neither agree nor disagree | 10 (11.0%) | 8 (7.5%) | 18 (9.1%) | |
| Â Â Â Somewhat agree | 42 (46.2%) | 52 (48.6%) | 94 (47.5%) | |
| Â Â Â Strongly agree | 31 (34.1%) | 36 (33.6%) | 67 (33.8%) | |
| Getting a good night’s sleep is important to me. | 0.0231 | |||
| Â Â Â Strongly disagree | 0 (0.0%) | 1 (0.9%) | 1 (0.5%) | |
| Â Â Â Somewhat disagree | 1 (1.1%) | 0 (0.0%) | 1 (0.5%) | |
| Â Â Â Neither agree nor disagree | 3 (3.3%) | 1 (0.9%) | 4 (2.0%) | |
| Â Â Â Somewhat agree | 19 (20.9%) | 8 (7.5%) | 27 (13.6%) | |
| Â Â Â Strongly agree | 68 (74.7%) | 97 (90.7%) | 165 (83.3%) | |
| Most of my friends have a healthy sleep routine. | 0.1681 | |||
| Â Â Â N-Miss | 1 | 0 | 1 | |
| Â Â Â Strongly disagree | 6 (6.7%) | 3 (2.8%) | 9 (4.6%) | |
| Â Â Â Somewhat disagree | 21 (23.3%) | 19 (17.8%) | 40 (20.3%) | |
| Â Â Â Neither agree nor disagree | 35 (38.9%) | 60 (56.1%) | 95 (48.2%) | |
| Â Â Â Somewhat agree | 22 (24.4%) | 20 (18.7%) | 42 (21.3%) | |
| Â Â Â Strongly agree | 6 (6.7%) | 5 (4.7%) | 11 (5.6%) | |
| Lack of sleep affects my academic performance. | 0.8941 | |||
| Â Â Â N-Miss | 1 | 0 | 1 | |
| Â Â Â Strongly disagree | 1 (1.1%) | 2 (1.9%) | 3 (1.5%) | |
| Â Â Â Somewhat disagree | 4 (4.4%) | 7 (6.5%) | 11 (5.6%) | |
| Â Â Â Neither agree nor disagree | 7 (7.8%) | 7 (6.5%) | 14 (7.1%) | |
| Â Â Â Somewhat agree | 39 (43.3%) | 41 (38.3%) | 80 (40.6%) | |
| Â Â Â Strongly agree | 39 (43.3%) | 50 (46.7%) | 89 (45.2%) | |
| Having a regular sleep routine improves mental clarity/sharpness. | ||||
| Â Â Â Strongly disagree | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | |
| Â Â Â Somewhat disagree | 1 (1.1%) | 0 (0.0%) | 1 (0.5%) | |
| Â Â Â Neither agree nor disagree | 5 (5.5%) | 5 (4.7%) | 10 (5.1%) | |
| Â Â Â Somewhat agree | 21 (23.1%) | 29 (27.1%) | 50 (25.3%) | |
| Â Â Â Strongly agree | 64 (70.3%) | 73 (68.2%) | 137 (69.2%) | |
| I think cutting out screen use 1 hour before bed leads to better sleep. | 0.9221 | |||
| Â Â Â Strongly disagree | 4 (4.4%) | 3 (2.8%) | 7 (3.5%) | |
| Â Â Â Somewhat disagree | 2 (2.2%) | 4 (3.7%) | 6 (3.0%) | |
| Â Â Â Neither agree nor disagree | 19 (20.9%) | 20 (18.7%) | 39 (19.7%) | |
| Â Â Â Somewhat agree | 37 (40.7%) | 46 (43.0%) | 83 (41.9%) | |
| Â Â Â Strongly agree | 29 (31.9%) | 34 (31.8%) | 63 (31.8%) | |
| I think working out regularly leads to better sleep. | ||||
| Â Â Â Strongly disagree | 0 (0.0%) | 0 (0.0%) | 0 (0.0%) | |
| Â Â Â Somewhat disagree | 2 (2.2%) | 1 (0.9%) | 3 (1.5%) | |
| Â Â Â Neither agree nor disagree | 8 (8.8%) | 9 (8.4%) | 17 (8.6%) | |
| Â Â Â Somewhat agree | 29 (31.9%) | 28 (26.2%) | 57 (28.8%) | |
| Â Â Â Strongly agree | 52 (57.1%) | 69 (64.5%) | 121 (61.1%) | |
| I think meditating before bed helps sleep quality. | 0.8941 | |||
| Â Â Â N-Miss | 0 | 1 | 1 | |
| Â Â Â Strongly disagree | 4 (4.4%) | 2 (1.9%) | 6 (3.0%) | |
| Â Â Â Somewhat disagree | 5 (5.5%) | 6 (5.7%) | 11 (5.6%) | |
| Â Â Â Neither agree nor disagree | 30 (33.0%) | 36 (34.0%) | 66 (33.5%) | |
| Â Â Â Somewhat agree | 29 (31.9%) | 36 (34.0%) | 65 (33.0%) | |
| Â Â Â Strongly agree | 23 (25.3%) | 26 (24.5%) | 49 (24.9%) | |
| I can maintain healthy sleep habits. | < 0.0011 | |||
| Â Â Â N-Miss | 1 | 0 | 1 | |
| Â Â Â Not at all confident | 12 (13.3%) | 2 (1.9%) | 14 (7.1%) | |
| Â Â Â Slightly confident | 22 (24.4%) | 6 (5.6%) | 28 (14.2%) | |
| Â Â Â Somewhat confident | 35 (38.9%) | 30 (28.0%) | 65 (33.0%) | |
| Â Â Â Pretty confident | 20 (22.2%) | 49 (45.8%) | 69 (35.0%) | |
| Â Â Â Extremely confident | 1 (1.1%) | 20 (18.7%) | 21 (10.7%) | |
| I can cut out screen use 1 hour before bed. | 0.0441 | |||
| Â Â Â N-Miss | 1 | 0 | 1 | |
| Â Â Â Not at all confident | 19 (21.1%) | 25 (23.4%) | 44 (22.3%) | |
| Â Â Â Slightly confident | 38 (42.2%) | 24 (22.4%) | 62 (31.5%) | |
| Â Â Â Somewhat confident | 18 (20.0%) | 32 (29.9%) | 50 (25.4%) | |
| Â Â Â Pretty confident | 9 (10.0%) | 18 (16.8%) | 27 (13.7%) | |
| Â Â Â Extremely confident | 6 (6.7%) | 8 (7.5%) | 14 (7.1%) | |
| I can work out regularly. | 0.0281 | |||
| Â Â Â N-Miss | 2 | 0 | 2 | |
| Â Â Â Not at all confident | 12 (13.5%) | 3 (2.8%) | 15 (7.7%) | |
| Â Â Â Slightly confident | 17 (19.1%) | 20 (18.7%) | 37 (18.9%) | |
| Â Â Â Somewhat confident | 15 (16.9%) | 23 (21.5%) | 38 (19.4%) | |
| Â Â Â Pretty confident | 25 (28.1%) | 24 (22.4%) | 49 (25.0%) | |
| Â Â Â Extremely confident | 20 (22.5%) | 37 (34.6%) | 57 (29.1%) | |
| I can meditate before bed. | 0.5691 | |||
| Â Â Â N-Miss | 1 | 0 | 1 | |
| Â Â Â Not at all confident | 18 (20.0%) | 26 (24.3%) | 44 (22.3%) | |
| Â Â Â Slightly confident | 27 (30.0%) | 24 (22.4%) | 51 (25.9%) | |
| Â Â Â Somewhat confident | 26 (28.9%) | 28 (26.2%) | 54 (27.4%) | |
| Â Â Â Pretty confident | 11 (12.2%) | 20 (18.7%) | 31 (15.7%) | |
| Â Â Â Extremely confident | 8 (8.9%) | 9 (8.4%) | 17 (8.6%) | |
| What do you consider a good night’s sleep? | 0.2861 | |||
| Â Â Â 10+ hours | 1 (1.1%) | 0 (0.0%) | 1 (0.5%) | |
| Â Â Â 7 hours | 16 (17.6%) | 11 (10.3%) | 27 (13.6%) | |
| Â Â Â 8 hours | 58 (63.7%) | 79 (73.8%) | 137 (69.2%) | |
| Â Â Â 9 hours | 15 (16.5%) | 17 (15.9%) | 32 (16.2%) | |
| Â Â Â Less than or equal to 6 hours | 1 (1.1%) | 0 (0.0%) | 1 (0.5%) | |
| Energy for daily activities | 0.2452 | |||
| Â Â Â Median (Q1, Q3) | 5.00 (4.00, 5.00) | 5.00 (4.00, 5.00) | 5.00 (4.00, 5.00) | |
| Attractiveness (to self & others) | 0.2562 | |||
| Â Â Â Median (Q1, Q3) | 3.00 (2.25, 4.00) | 3.00 (2.00, 4.00) | 3.00 (2.00, 4.00) | |
| Productivity at work/school | 0.9782 | |||
| Â Â Â Median (Q1, Q3) | 5.00 (4.00, 5.00) | 5.00 (4.00, 5.00) | 5.00 (4.00, 5.00) | |
| Accomplishment of other daily goals (e.g. exercise, cooking, paying bills, etc) | 0.6932 | |||
| Â Â Â Median (Q1, Q3) | 5.00 (4.00, 5.00) | 4.00 (4.00, 5.00) | 5.00 (4.00, 5.00) | |
| Mental and emotional wellbeing | 0.5032 | |||
| Â Â Â Median (Q1, Q3) | 5.00 (4.00, 5.00) | 5.00 (4.00, 5.00) | 5.00 (4.00, 5.00) | |
| Fostering/maintaining relationships | 0.7842 | |||
| Â Â Â Median (Q1, Q3) | 4.00 (3.00, 5.00) | 4.00 (3.00, 5.00) | 4.00 (3.00, 5.00) | |
| Caring for children | 0.9162 | |||
| Â Â Â Median (Q1, Q3) | 1.00 (1.00, 3.00) | 1.00 (1.00, 4.00) | 1.00 (1.00, 3.00) | |
| Get outside for 10 minutes in the morning. | 0.7992 | |||
| Â Â Â Median (Q1, Q3) | 4.00 (2.00, 5.00) | 4.00 (2.00, 5.00) | 4.00 (2.00, 5.00) | |
| Exercise during the day. | 0.0512 | |||
| Â Â Â Median (Q1, Q3) | 4.00 (3.00, 5.00) | 4.00 (3.00, 5.00) | 4.00 (3.00, 5.00) | |
| Do a breathing exercise before you sleep. | 0.4692 | |||
| Â Â Â Median (Q1, Q3) | 3.00 (2.00, 4.00) | 3.00 (2.00, 4.00) | 3.00 (2.00, 4.00) | |
| Not use screens (i.e. cell phone, tablet, computer, television) for 1 hour before bed | 0.0762 | |||
| Â Â Â Median (Q1, Q3) | 2.00 (1.00, 3.00) | 3.00 (2.00, 3.00) | 2.00 (2.00, 3.00) | |
| Listen to a calming audiobook or podcast before bed | 0.8552 | |||
| Â Â Â Median (Q1, Q3) | 3.00 (2.00, 4.00) | 3.00 (2.00, 4.00) | 3.00 (2.00, 4.00) | |
| Where have you seen or received information about sleep quality or sleep hygiene? | 0.0411 | |||
| Â Â Â N-Miss | 7 | 8 | 15 | |
| Â Â Â Friends | 1 (1.2%) | 7 (7.1%) | 8 (4.4%) | |
| Â Â Â Health care professional | 37 (44.0%) | 33 (33.3%) | 70 (38.3%) | |
| Â Â Â News sources | 4 (4.8%) | 8 (8.1%) | 12 (6.6%) | |
| Â Â Â Other online source | 12 (14.3%) | 12 (12.1%) | 24 (13.1%) | |
| Â Â Â Social media | 20 (23.8%) | 35 (35.4%) | 55 (30.1%) | |
| Â Â Â University wellbeing resources | 10 (11.9%) | 4 (4.0%) | 14 (7.7%) |
Fig 1
g<- ggplot(analysisdata) +
geom_bar(aes(x=Q3_role, fill=compositeoutcomegoodsleep)) +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=32)) +
labs(title = "Role") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() Fig 2
g<- ggplot(student) +
geom_bar(aes(x=Q2_program, fill=compositeoutcomegoodsleep)) +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=32)) +
labs(title = "What is your current program at Bloomberg?") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() Fig 3
g<- ggplot(student) +
geom_bar(aes(x=Q4_gender, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=32)) +
labs(title = "What gender do you identify as?") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() Fig 4
g<- ggplot(student) +
geom_bar(aes(x=Q37_employed, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=32)) +
labs(title = "Are you currently employed outside of your education program?") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() Fig 5
g<- ggplot(employed) +
geom_bar(aes(x=Q38_wfh, fill=compositeoutcomegoodsleep)) +
coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=32)) +
labs(title = "Do you work from home?") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() Fig 6
g<- ggplot(notworkfromhome) +
geom_bar(aes(x=Q39_dayornight, fill=compositeoutcomegoodsleep)) +
coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=32)) +
labs(title = "Do you work day or night shifts?") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() Fig 7
g<- ggplot(analysisdata) +
geom_bar(aes(x=Q7_children, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=15)) +
labs(title = "Are there children living in your household?") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() Fig 8
g<-ggplot(analysisdata) +
geom_bar(aes(x=Q8_diagnosis, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=20), axis.text.x = element_text(size=32)) +
labs(title = "Have you ever been diagnosed with any of the following sleep disorders?") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() Fig 9
g<-ggplot(analysisdata) +
geom_bar(aes(x=Q9_howoftensleepy, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=32)) +
labs(title = "How often do you feel sleepy during the day?") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() Fig 10
g<- ggplot(analysisdata) +
geom_bar(aes(x=Q13_consistentwakeup, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=32)) +
labs(title = "Do you have a consistent time you wake up on weekdays?") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() Fig 11
g<- ggplot(analysisdata) +
geom_bar(aes(x=Q15_consistentbedtimeonweekdays, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "Do you have a consistent bedtime on weekdays?") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() Fig 12
g<- ggplot(analysisdata) +
geom_bar(aes(x=Q49_sleepqualitychangecovid, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "Has your sleep quality changed due to the COVID-19 pandemic?") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() Fig 13
g<- ggplot(analysisdata) +
geom_bar(aes(x=bedtimeroutine, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "My bedtime routine includes") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() Fig 14
g<-ggplot(analysisdata) +
geom_bar(aes(x=Q17_stressedaboutschool, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "How stressed do you currently feel about school?") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() ## Warning: Removed 2 rows containing non-finite values (stat_count).
Fig 15
g<- ggplot(analysisdata) +
geom_bar(aes(x=cantsleepfeeling, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "When you can't sleep do you feel") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() Fig 16
g<- ggplot(analysisdata) +
geom_bar(aes(x=Q18_howoftenpracticemindfullness, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "How often do you practice mindfulness techniques? (i.e. breathing exercises, meditation, etc.,") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() Fig 17
g<- ggplot(analysisdata) +
geom_bar(aes(x=behaviors, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "Which of the following behaviors do you participate in? Check all that apply. ") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() Fig 18
g<-ggplot(analysisdata) +
geom_bar(aes(x=Q44_1_thingsidointhelasthourbeforesleepaffectthequalityofmysleep, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "The things I do in the last hour before bed affect the quality of my sleep.") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() g<- ggplot(analysisdata) +
geom_bar(aes(x=Q44_2_gettingagoodnightssleepisimportantome, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "Getting a good night's sleep is important to me.") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() g<- ggplot(analysisdata) +
geom_bar(aes(x=Q44_3_mostofmyfriendshaveahealthysleeproutine, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "Most of my friends have a healthy sleep routine.") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() g<- ggplot(analysisdata) +
geom_bar(aes(x=Q44_4_lackofsleepaffectsmyacademicperformance, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "Lack of sleep affects my academic performance.") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() g<- ggplot(analysisdata) +
geom_bar(aes(x=Q44_5_havingaregularsleeproutineimprovesmentalclariy, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "Having a regular sleep routine improves mental clarity/sharpness.") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() g<- ggplot(analysisdata) +
geom_bar(aes(x=Q44_6_ifeelpositiveaboutthequalityofmysleep, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "I feel positive about the quality of my sleep.") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() g<- ggplot(analysisdata) +
geom_bar(aes(x=Q44_7_ithinkcuttingoutscreenuseonehourbeforesleepleadstobettersleep, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "I think cutting out screen use 1 hour before bed leads to better sleep.") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() g<-ggplot(analysisdata) +
geom_bar(aes(x=Q44_8_ithinkingworkingoutregularlyleadstobettersleep, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "I think working out regularly leads to better sleep.") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() g<- ggplot(analysisdata) +
geom_bar(aes(x=Q44_9_ithinkmeditatingbeforesleephelpsquality, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "I think meditating before bed helps sleep quality.") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() Fig 19
g <- ggplot(analysisdata) +
geom_bar(aes(x=Q59_1_icanmaintainhealthysleephabits, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "I can maintain healthy sleep habits.") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() g<- ggplot(analysisdata) +
geom_bar(aes(x=Q59_2_icancutoutscreenuseonehourbeforesleep, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "I can cut out screen use 1 hour before bed.") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() g <- ggplot(analysisdata) +
geom_bar(aes(x=Q59_3_icanworkoutregularly, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "I can work out regularly.") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() g<- ggplot(analysisdata) +
geom_bar(aes(x=Q59_4_icanmediatebeforebed, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "I can meditate before bed.") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() Fig 20
g <- ggplot(analysisdata) +
geom_bar(aes(x=Q50_1_energyfordailyacitivites, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "Energy for daily activities") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() ## Warning: Removed 1 rows containing non-finite values (stat_count).
g <- ggplot(analysisdata) +
geom_bar(aes(x=Q50_2_attractivness, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "Attractiveness (to self & others)") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() ## Warning: Removed 1 rows containing non-finite values (stat_count).
g<- ggplot(analysisdata) +
geom_bar(aes(x=Q50_3_productivity, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "Productivity at work/school") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() ## Warning: Removed 1 rows containing non-finite values (stat_count).
g <- ggplot(analysisdata) +
geom_bar(aes(x=Q50_4_accomplishmentofotherdailygoals, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "Accomplishment of other daily goals (e.g. exercise, cooking, paying bills, etc)") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() ## Warning: Removed 1 rows containing non-finite values (stat_count).
g<- ggplot(analysisdata) +
geom_bar(aes(x=Q50_5_mentalandemotionalwellbeing, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "Mental and emotional wellbeing") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() ## Warning: Removed 2 rows containing non-finite values (stat_count).
g <- ggplot(analysisdata) +
geom_bar(aes(x=Q50_6_fosteringmaintaingrelationships, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "Fostering/maintaining relationships") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() ## Warning: Removed 2 rows containing non-finite values (stat_count).
g <- ggplot(analysisdata) +
geom_bar(aes(x=Q50_7_caringforchildren, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "Caring for children") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() ## Warning: Removed 8 rows containing non-finite values (stat_count).
Fig 21
g <- ggplot(analysisdata) +
geom_bar(aes(x=Q59_1_icanmaintainhealthysleephabits, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "I can maintain healthy sleep habits.") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() g <- ggplot(analysisdata) +
geom_bar(aes(x=Q59_2_icancutoutscreenuseonehourbeforesleep, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "I can cut out screen use 1 hour before bed.") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() g<-ggplot(analysisdata) +
geom_bar(aes(x=Q59_3_icanworkoutregularly, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "I can work out regularly.") +
xlab("") +
labs(fill='')
g + scale_fill_lancet() g <-ggplot(analysisdata) +
geom_bar(aes(x=Q59_4_icanmediatebeforebed, fill=compositeoutcomegoodsleep)) +
#coord_flip() +
theme_test() +
theme(text = element_text(size=32), axis.text.x = element_text(size=18)) +
labs(title = "I can meditate before bed.") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet() Fig 22
g<-ggplot(analysisdata) +
geom_bar(aes(x=information, fill=compositeoutcomegoodsleep)) +
theme_test() +
theme(text = element_text(size=20), axis.text.x = element_text(size=16)) +
labs(title = "Where have you seen or received information about sleep quality or sleep hygiene? Check all that apply. ") +
xlab("") +
labs(fill='')
g+ scale_fill_lancet()